package com.ly.heart.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ly.common.core.domain.BaseVo;
import lombok.Data;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 物料信息对象 erp_material_info
 *
 * @author wutao
 * @date 2024-07-04
 */
@TableName ( "erp_material_info" )
@ApiModel ( value = "erp_material_info对象", description = "物料信息" )
@Data
@JsonInclude ( JsonInclude.Include.ALWAYS )
public class MaterialEntity extends BaseVo {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId ( type = IdType.INPUT )
    private String id;

    /**
     * 物料名称
     */
    @ApiModelProperty ( "物料名称" )
    @TableField ( "material_name" )
    @Excel ( name = "物料名称" )
    private String materialName;

    @ApiModelProperty ( "创建组织" )
    @TableField ( "create_org" )
    @Excel ( name = "创建组织" )
    private String createOrg;

    @ApiModelProperty ( "使用组织" )
    @TableField ( "use_org" )
    @Excel ( name = "使用组织" )
    private String useOrg;

    /**
     * 物料编码
     */
    @ApiModelProperty ( "物料编码" )
    @TableField ( "material_code" )
    @Excel ( name = "物料编码" )
    private String materialCode;

    /**
     * 规格型号
     */
    @ApiModelProperty ( "规格型号" )
    @TableField ( "model" )
    @Excel ( name = "规格型号" )
    private String model;

    /**
     * 品牌
     */
    @ApiModelProperty ( "品牌" )
    @TableField ( "brand" )
    @Excel ( name = "品牌" )
    private String brand;

    /**
     * 基础单位（dialog）
     */
    @TableField ( "unit" )
    @ApiModelProperty ( "基础单位" )
    @Excel ( name = "基础单位", readConverterExp = "d=ialog" )
    private String unit;

    /**
     * 是否使用(1是0否)
     */
    @ApiModelProperty ( "是否使用(1是0否)" )
    @TableField ( value = "is_used" )
    @TableLogic
    @Excel ( name = "是否使用(1是2否)" )
    private Long isUsed;

    /**
     * 助记码
     */
    @ApiModelProperty ( "助记码" )
    @TableField ( "mnemonic_code" )
    @Excel ( name = "助记码" )
    private String mnemonicCode;

    /**
     * 旧物料编码
     */
    @ApiModelProperty ( "旧物料编码" )
    @TableField ( "old_material_code" )
    @Excel ( name = "旧物料编码" )
    private String oldMaterialCode;

    /**
     * 条码
     */
    @ApiModelProperty ( "条码" )
    @TableField ( "bar_code" )
    @Excel ( name = "条码" )
    private String barCode;

    /**
     * 描述
     */
    @ApiModelProperty ( "描述" )
    @TableField ( "material_desc" )
    @Excel ( name = "描述" )
    private String materialDesc;

    /**
     * 物料分组dialog
     */
    @ApiModelProperty ( "物料分组dialog" )
    @TableField ( "material_group" )
    @Excel ( name = "物料分组dialog" )
    private String materialGroup;

    /**
     * 物料属性（下拉框）
     */
    @TableField ( "material_property" )
    @ApiModelProperty ( "物料属性；\n" +
            "1、外购；" +
            "2、自制；" +
            "3、委外；" +
            "4、特征；" +
            "5、虚拟；" +
            "6、服务；" +
            "7、一次性；" +
            "9、配置；" +
            "10、资产；" +
            "11、费用；" +
            "12、模型；" +
            "13、产品系列；" )
    @Excel ( name = "物料属性", readConverterExp = "下=拉框" )
    private String materialProperty;

    /**
     * 配置生产
     */
    @ApiModelProperty ( "配置生产" )
    @TableField ( "configuration_production" )
    @Excel ( name = "配置生产" )
    private String configurationProduction;

    /**
     * 特征件子项（下拉框）
     */
    @TableField ( "sub_items" )
    @ApiModelProperty ( "特征件子项" )
    @Excel ( name = "特征件子项", readConverterExp = "下=拉框" )
    private String subItems;

    /**
     * 套件（下拉框）
     */
    @TableField ( "kit" )
    @ApiModelProperty ( "套件" )
    @Excel ( name = "套件", readConverterExp = "下=拉框" )
    private String kit;

    /**
     * 允许采购(0:false;1true)
     */
    @ApiModelProperty ( "允许采购(0:false;1true)" )
    @TableField ( "allow_purchase" )
    @Excel ( name = "允许采购(0:false;1true)" )
    private String allowPurchase;

    /**
     * 允许销售(0:false;1true)
     */
    @ApiModelProperty ( "允许销售(0:false;1true)" )
    @TableField ( "allow_sale" )
    @Excel ( name = "允许销售(0:false;1true)" )
    private String allowSale;

    /**
     * 允许库存(0:false;1true)
     */
    @ApiModelProperty ( "允许库存(0:false;1true)" )
    @TableField ( "allow_inventory" )
    @Excel ( name = "允许库存(0:false;1true)" )
    private String allowInventory;

    /**
     * 允许生产(0:false;1true)
     */
    @ApiModelProperty ( "允许生产(0:false;1true)" )
    @TableField ( "allow_produce" )
    @Excel ( name = "允许生产(0:false;1true)" )
    private String allowProduce;

    /**
     * 允许委外(0:false;1true)
     */
    @ApiModelProperty ( "允许委外(0:false;1true)" )
    @TableField ( "allow_outsource" )
    @Excel ( name = "允许委外(0:false;1true)" )
    private String allowOutsource;

    /**
     * 允许转资产(0:false;1true)
     */
    @ApiModelProperty ( "允许转资产(0:false;1true)" )
    @TableField ( "allow_asset" )
    @Excel ( name = "允许转资产(0:false;1true)" )
    private String allowAsset;

    /**
     * 默认税率dialog
     */
    @ApiModelProperty ( "默认税率编码" )
    @TableField ( "default_tax_rate" )
    @Excel ( name = "默认税率dialog" )
    private String defaultTaxRate;

    /**
     * 存货类别dialog
     */
    @ApiModelProperty ( "存货类别dialog" )
    @TableField ( "inventory_type" )
    @Excel ( name = "存货类别dialog" )
    private String inventoryType;

    /**
     * 税分类dialog
     */
    @ApiModelProperty ( "税分类dialog" )
    @TableField ( "tax_type" )
    @Excel ( name = "税分类dialog" )
    private String taxType;

    /**
     * 结算成本价加减比例
     */
    @ApiModelProperty ( "结算成本价加减比例" )
    @TableField ( "cost_price_ratio" )
    @Excel ( name = "结算成本价加减比例" )
    private String costPriceRatio;

    /**
     * 禁用与原因
     */
    @ApiModelProperty ( "禁用与原因" )
    @TableField ( "reason_for_disable" )
    @Excel ( name = "禁用与原因" )
    private String reasonForDisable;

    /**
     * 毛重
     */
    @ApiModelProperty ( "毛重" )
    @TableField ( "gross_weight" )
    @Excel ( name = "毛重" )
    private String grossWeight;

    /**
     * 净重
     */
    @ApiModelProperty ( "净重" )
    @TableField ( "net_weight" )
    @Excel ( name = "净重" )
    private String netWeight;

    /**
     * 重量单位dialog
     */
    @ApiModelProperty ( "重量单位dialog" )
    @TableField ( "weight_unit" )
    @Excel ( name = "重量单位dialog" )
    private String weightUnit;

    /**
     * 长
     */
    @ApiModelProperty ( "长" )
    @TableField ( "length_str" )
    @Excel ( name = "长" )
    private String lengthStr;

    /**
     * 宽
     */
    @ApiModelProperty ( "宽" )
    @TableField ( "wide_str" )
    @Excel ( name = "宽" )
    private String wideStr;

    /**
     * 高
     */
    @ApiModelProperty ( "高" )
    @TableField ( "height_str" )
    @Excel ( name = "高" )
    private String heightStr;

    /**
     * 体积
     */
    @ApiModelProperty ( "体积" )
    @TableField ( "volume" )
    @Excel ( name = "体积" )
    private String volume;

    /**
     * 尺寸单位dialog
     */
    @ApiModelProperty ( "尺寸单位dialog" )
    @TableField ( "size_unit" )
    @Excel ( name = "尺寸单位dialog" )
    private String sizeUnit;

    /**
     * 数据状态
     */
    @ApiModelProperty ( "数据状态" )
    @TableField ( "data_state" )
    @Excel ( name = "数据状态" )
    private String dataState;

    /**
     * 是否变更（1是0否）
     */
    @TableField ( "is_change" )
    @ApiModelProperty ( "是否变更" )
    @Excel ( name = "是否变更", readConverterExp = "1=是0否" )
    private String isChange;

    /**
     * 图片
     */
    @ApiModelProperty ( "图片" )
    @TableField ( "img_url" )
    @Excel ( name = "图片" )
    private String imgUrl;

    /**
     * 审核人
     */
    @ApiModelProperty ( "审核人" )
    @TableField ( "examine_by" )
    @Excel ( name = "审核人" )
    private String examineBy;

    /**
     * 审核时间
     */
    @ApiModelProperty ( "审核时间" )
    @TableField ( "examine_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd" )
    @Excel ( name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd" )
    private Date examineTime;

    /**
     * 禁用人
     */
    @ApiModelProperty ( "禁用人" )
    @TableField ( "disable_by" )
    @Excel ( name = "禁用人" )
    private String disableBy;


    /**
     * 所属公司
     */
    @ApiModelProperty ( "所属公司" )
    @TableField ( "dept_id" )
    @Excel ( name = "所属公司" )
    private String deptId;

    /**
     * 创建者
     */
    @TableField ( "create_by" )
    private String createBy;

    /**
     * 创建时间
     */
    @TableField ( "create_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    /**
     * 更新者
     */
    @TableField ( "update_by" )
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField ( "update_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    /**
     * 流程实例id
     */
    @ApiModelProperty ( "流程实例id" )
    @TableField ( "instance_id" )
    @Excel ( name = "流程实例id" )
    private String instanceId;

    /**
     * 审核状态
     */
    @ApiModelProperty ( "审核状态" )
    @TableField ( "state" )
    @Excel ( name = "审核状态" )
    private String state;


    @ApiModelProperty ( "业务type" )
    @TableField ( exist = false )
    private String businessType;

    @ApiModelProperty ( "流程模型id" )
    @TableField ( exist = false )
    private String modelId;

    @ApiModelProperty ( "物料类型" )
    @TableField ( exist = false )
    private String typeName;


    @ApiModelProperty ( "是否禁用；1：是；2：否" )
    @TableField ( "is_disabled" )
    @Excel ( name = "是否禁用" )
    private String isDisabled;


    @TableField ( exist = false )
    private MaterialInventoryEntity materialInventoryEntity;

    @TableField ( exist = false )
    private MaterialPlanAttributeEntity materialPlanAttributeEntity;

    @TableField ( exist = false )
    private MaterialProcureEntity materialProcureEntity;

    @TableField ( exist = false )
    private MaterialProductEntity materialProductEntity;

    @TableField ( exist = false )
    private MaterialQualityEntity materialQualityEntity;

    @TableField ( exist = false )
    private MaterialSaleEntity materialSaleEntity;

    @TableField ( exist = false )
    private String inventoryUnitName; //库存单位名称

    @TableField ( exist = false )
    private String warehouseName; //库存仓库

    @TableField ( exist = false )
    private String isLock; // 是否锁库

    @TableField ( exist = false )
    private String saleUnitName; // 销售单位名称

    @TableField ( exist = false )
    private String isBatch;

}
